<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: QASM Logging</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">QASM Logging</div>  </div>
</div><!--header-->
<div class="contents">

<p>Functions for recording performed gates to <a href="https://en.wikipedia.org/wiki/OpenQASM">QASM</a>  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab3a410abab3e8beb394bd3bbfae8977c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gab3a410abab3e8beb394bd3bbfae8977c">clearRecordedQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gab3a410abab3e8beb394bd3bbfae8977c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all QASM so far recorded.  <a href="group__qasm.html#gab3a410abab3e8beb394bd3bbfae8977c">More...</a><br /></td></tr>
<tr class="separator:gab3a410abab3e8beb394bd3bbfae8977c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gacf139d0a54b1f9e5c2f2feff742b8c76">printRecordedQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print recorded QASM to stdout.  <a href="group__qasm.html#gacf139d0a54b1f9e5c2f2feff742b8c76">More...</a><br /></td></tr>
<tr class="separator:gacf139d0a54b1f9e5c2f2feff742b8c76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65bf1906298ca6355e2942f4923d77b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#ga65bf1906298ca6355e2942f4923d77b6">startRecordingQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:ga65bf1906298ca6355e2942f4923d77b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable QASM recording.  <a href="group__qasm.html#ga65bf1906298ca6355e2942f4923d77b6">More...</a><br /></td></tr>
<tr class="separator:ga65bf1906298ca6355e2942f4923d77b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdaa339967f0955176a4967f01364182"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#gabdaa339967f0955176a4967f01364182">stopRecordingQASM</a> (<a class="el" href="structQureg.html">Qureg</a> qureg)</td></tr>
<tr class="memdesc:gabdaa339967f0955176a4967f01364182"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable QASM recording.  <a href="group__qasm.html#gabdaa339967f0955176a4967f01364182">More...</a><br /></td></tr>
<tr class="separator:gabdaa339967f0955176a4967f01364182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0054955857ce83b88e127d731796c23d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qasm.html#ga0054955857ce83b88e127d731796c23d">writeRecordedQASMToFile</a> (<a class="el" href="structQureg.html">Qureg</a> qureg, char *filename)</td></tr>
<tr class="memdesc:ga0054955857ce83b88e127d731796c23d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes recorded QASM to a file, throwing an error if inaccessible.  <a href="group__qasm.html#ga0054955857ce83b88e127d731796c23d">More...</a><br /></td></tr>
<tr class="separator:ga0054955857ce83b88e127d731796c23d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions for recording performed gates to <a href="https://en.wikipedia.org/wiki/OpenQASM">QASM</a> </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gab3a410abab3e8beb394bd3bbfae8977c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab3a410abab3e8beb394bd3bbfae8977c">&#9670;&nbsp;</a></span>clearRecordedQASM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void clearRecordedQASM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear all QASM so far recorded. </p>
<p>This does not start or stop recording.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">qureg</td><td>The qureg of which to clear the QASM log </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00095">95</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                                    {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <a class="code" href="QuEST__qasm_8c.html#af2cdfa07be122a2c0b0e950ef45450bc">qasm_clearRecorded</a>(qureg);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__qasm_8c_source.html#l00477">qasm_clearRecorded()</a>.</p>

</div>
</div>
<a id="gacf139d0a54b1f9e5c2f2feff742b8c76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacf139d0a54b1f9e5c2f2feff742b8c76">&#9670;&nbsp;</a></span>printRecordedQASM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void printRecordedQASM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Print recorded QASM to stdout. </p>
<p>This does not clear the QASM log, nor does it start or stop QASM recording.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">qureg</td><td>Prints the QASM recorded for this qureg. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00099">99</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                                    {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="QuEST__qasm_8c.html#a9d97fdaec443ed238c1e72e387a688e3">qasm_printRecorded</a>(qureg);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__qasm_8c_source.html#l00484">qasm_printRecorded()</a>.</p>

</div>
</div>
<a id="ga65bf1906298ca6355e2942f4923d77b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga65bf1906298ca6355e2942f4923d77b6">&#9670;&nbsp;</a></span>startRecordingQASM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void startRecordingQASM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable QASM recording. </p>
<p>Gates applied to qureg will here-after be added to a growing log of QASM instructions, progressively consuming more memory until disabled with <a class="el" href="group__qasm.html#gabdaa339967f0955176a4967f01364182" title="Disable QASM recording.">stopRecordingQASM()</a>. The QASM log is bound to this qureg instance.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">qureg</td><td>The qureg to begin recording subsequent operations upon </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00087">87</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                                     {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="QuEST__qasm_8c.html#a84b0328814c0b17e127396cb36065108">qasm_startRecording</a>(qureg);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__qasm_8c_source.html#l00084">qasm_startRecording()</a>.</p>

</div>
</div>
<a id="gabdaa339967f0955176a4967f01364182"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabdaa339967f0955176a4967f01364182">&#9670;&nbsp;</a></span>stopRecordingQASM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stopRecordingQASM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable QASM recording. </p>
<p>The recorded QASM will be maintained in qureg and continue to be appended to if startRecordingQASM is recalled.</p>
<p>Has no effect if <code>qureg</code> was not already recording operations.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">qureg</td><td>The qureg to halt recording subsequent operations upon </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00091">91</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                                    {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="QuEST__qasm_8c.html#a77ad622c5ba852708a80755ac1792288">qasm_stopRecording</a>(qureg);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__qasm_8c_source.html#l00088">qasm_stopRecording()</a>.</p>

</div>
</div>
<a id="ga0054955857ce83b88e127d731796c23d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0054955857ce83b88e127d731796c23d">&#9670;&nbsp;</a></span>writeRecordedQASMToFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void writeRecordedQASMToFile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structQureg.html">Qureg</a>&#160;</td>
          <td class="paramname"><em>qureg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes recorded QASM to a file, throwing an error if inaccessible. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">qureg</td><td>Writes the QASM recorded for this qureg to file </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>The filename of the file to contain the recorded QASM </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">invalidQuESTInputError</td><td>if <code>filename</code> cannot be written to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Tyson Jones </dd></dl>

<p class="definition">Definition at line <a class="el" href="QuEST_8c_source.html#l00103">103</a> of file <a class="el" href="QuEST_8c_source.html">QuEST.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                                                          {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordtype">int</span> success = <a class="code" href="QuEST__qasm_8c.html#a39aeacb22460bd1430129795761ade28">qasm_writeRecordedToFile</a>(qureg, filename);</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="QuEST__validation_8c.html#a6b9523909701f7bd79f2ab7b56a8e6bd">validateFileOpened</a>(success, filename, __func__);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="QuEST__qasm_8c_source.html#l00489">qasm_writeRecordedToFile()</a>, and <a class="el" href="QuEST__validation_8c_source.html#l00507">validateFileOpened()</a>.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aQuEST__qasm_8c_html_a9d97fdaec443ed238c1e72e387a688e3"><div class="ttname"><a href="QuEST__qasm_8c.html#a9d97fdaec443ed238c1e72e387a688e3">qasm_printRecorded</a></div><div class="ttdeci">void qasm_printRecorded(Qureg qureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00484">QuEST_qasm.c:484</a></div></div>
<div class="ttc" id="aQuEST__qasm_8c_html_af2cdfa07be122a2c0b0e950ef45450bc"><div class="ttname"><a href="QuEST__qasm_8c.html#af2cdfa07be122a2c0b0e950ef45450bc">qasm_clearRecorded</a></div><div class="ttdeci">void qasm_clearRecorded(Qureg qureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00477">QuEST_qasm.c:477</a></div></div>
<div class="ttc" id="aQuEST__qasm_8c_html_a84b0328814c0b17e127396cb36065108"><div class="ttname"><a href="QuEST__qasm_8c.html#a84b0328814c0b17e127396cb36065108">qasm_startRecording</a></div><div class="ttdeci">void qasm_startRecording(Qureg qureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00084">QuEST_qasm.c:84</a></div></div>
<div class="ttc" id="aQuEST__validation_8c_html_a6b9523909701f7bd79f2ab7b56a8e6bd"><div class="ttname"><a href="QuEST__validation_8c.html#a6b9523909701f7bd79f2ab7b56a8e6bd">validateFileOpened</a></div><div class="ttdeci">void validateFileOpened(int opened, char *fn, const char *caller)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00507">QuEST_validation.c:507</a></div></div>
<div class="ttc" id="aQuEST__qasm_8c_html_a77ad622c5ba852708a80755ac1792288"><div class="ttname"><a href="QuEST__qasm_8c.html#a77ad622c5ba852708a80755ac1792288">qasm_stopRecording</a></div><div class="ttdeci">void qasm_stopRecording(Qureg qureg)</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00088">QuEST_qasm.c:88</a></div></div>
<div class="ttc" id="aQuEST__qasm_8c_html_a39aeacb22460bd1430129795761ade28"><div class="ttname"><a href="QuEST__qasm_8c.html#a39aeacb22460bd1430129795761ade28">qasm_writeRecordedToFile</a></div><div class="ttdeci">int qasm_writeRecordedToFile(Qureg qureg, char *filename)</div><div class="ttdoc">returns success of file write</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__qasm_8c_source.html#l00489">QuEST_qasm.c:489</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
